﻿using System;

namespace Orz.Framework.Core.Publisher
{
    /// <summary>
    /// The general interface of publisher.
    /// </summary>
    public interface IPublisher : IDisposable
    {
        /// <summary>
        /// Publish the message.
        /// </summary>
        /// <param name="message">The message.</param>
        void OnMessage(object message);

        /// <summary>
        /// Publish the message asynchronously.
        /// </summary>
        /// <param name="message">The message.</param>
        void OnMessageAsyn(object message);
    }
}
